import { createWebHashHistory, createRouter } from 'vue-router'


// import login from '@/views/login.vue'
const routes = [{
        path: '/login',
        name: 'login',
        component: () =>
            import ('../views/login.vue'),
    },
    {
        path: '/',
        name: 'main',
        component: () =>
            import ('../views/Main.vue'),
        children: [{
                path: '/index',
                name: 'index',
                meta: { id: '1', name: '首页', path: '/index' },
                component: () =>
                    import ('../views/index.vue'),
            },
            {
                path: '/hygl',
                name: 'hygl',
                meta: { id: '2', name: '会员管理', path: '/hygl' },
                component: () =>
                    import ('../views/hygl.vue')
            },
            {
                path: '/yggl',
                name: 'yggl',
                meta: { id: '3', name: '员工管理', path: '/yggl' },
                component: () =>
                    import ('../views/yggl.vue')
            },
            {
                path: '/qcgl',
                name: 'qcgl',
                meta: { id: '4', name: '器材管理', path: '/qcgl' },
                component: () =>
                    import ('../views/qcgl.vue')
            },
            {
                path: '/kcgl',
                name: 'qcgl',
                meta: { id: '5', name: '课程管理', path: '/kcgl' },
                component: () =>
                    import ('../views/kcgl.vue')
            },
            {
                path: '/my',
                name: 'my',
                meta: { id: '6', name: '我的', path: '/my' },
                component: () =>
                    import ('../views/my.vue')
            },
            {
                path: '/kbmkc',
                name: 'kbmkc',
                meta: { id: '7', name: '可报名课程', path: '/kbmkc' },
                component: () =>
                    import ('../views/kbmkc.vue')
            }

        ],
    }
]


const router = createRouter({
    history: createWebHashHistory(),
    routes,
})

export default router